Fixed error checking when structures are full