Some fixes to act scheduling code