Fix small bugs