Fix to cursor problem with exiting the plotting area.
Import clean up.