fixing two small bugs