working

fix minor bugs