Fix the bounds detection in ValidMove