diff --git a/python/schedule.hpp b/python/schedule.hpp
index 32e6bcefe26964aa3207257b9b4476a48cf88af6..7762d2f9d0b14187c3724fbbc7bc224c883e0cfa 100644
--- a/python/schedule.hpp
+++ b/python/schedule.hpp
@@ -18,6 +18,7 @@ struct schedule_shim_base {
     schedule_shim_base() = default;
     schedule_shim_base(const schedule_shim_base&) = delete;
     schedule_shim_base& operator=(schedule_shim_base&) = delete;
+    virtual ~schedule_shim_base() {}
 
     virtual arb::schedule schedule() const = 0;
 };
diff --git a/python/simulation.cpp b/python/simulation.cpp
index 1a95a9f1abbdc2aaabee126341e4baf787b9d030..ab29cd6c970e67c47357c261852728baf9f37f02 100644
--- a/python/simulation.cpp
+++ b/python/simulation.cpp
@@ -107,7 +107,7 @@ public:
     }
 
     py::object spikes() const {
-        return py::array_t<arb::spike>({spike_record_.size()}, spike_record_.data());
+        return py::array_t<arb::spike>(py::ssize_t(spike_record_.size()), spike_record_.data());
     }
 
     py::list get_probe_metadata(arb::cell_member_type probe_id) const {