Fixed small bug in the Engine class