Now checks for invalid moves