Quick fixes

Just fixed one annoying bug, forgot to test thoroughly!