fixed a batch of issues reported by goccia