Fixig small bugs found while testing