Fixed Bug in Grid.java