Fix drawing bug