Fix some samll bugs