Switched the order of two things and solved a crash yay C++