Checking for valid move before actually moving
Fixing checking for valid move logic