fixt few bugs