error checking when setting shapes