small bugs fixes