Fixed getValidMove