Fix bug in drawing empty shapes