Fixed isAvailable(int x, int y) method