fixed few minor bugs by Lauren