Bug-fix to crafty