Fixed bugs I added in last commit