fix for the tech shutdown

just moved the if down to a part that gets executed constantly