#176 Fixed bug causing segfault in callback.py