fixed two small bugs