fixed bug to make sure the column and row aren't full