Lesson learned; Don't write code at night. It will result in some really bad stuff