fix primitive draw error