bugfix in mcsolve with python callback function for the hamiltonian