Modified with failsafe triggers in case of problem