Moved code for disabled callbacks to vm.h file, to please Philippe.