Fixing bugs I added