Fixed a bug which the user can continue drawing a shape after it was
"closed"