Fixed an almost guaranteed bug, and formatting.