Fixed failed tests in engine