Fixed 2 horrible bugs.