added failsafe
fixed shit