Fix a bug where enemies can make invalid moves