fixed problem with mesh being drawn and switched renderers