Fixed a bug affecting non-layer drawings