Figured out what the bug was. Time to fix it