Fix few bugs2