fixed isFull error checking
added some more error checking