corrected small bugs