[Anirudh & Justin] fixed bugs and stuff