Fixed a small bug with DrawMode-based functions