Fix two small bugs