Fixed draw function