fixing minor bugs I introduced in last commit