implemented failsafes