fixed a rather odd drawing bug