Tested code and found that the code that was causing problems wasn't needed to begin with. Deleted and cleaned up code.