Changed mouse drag flag to an int. Fixed initialization