added safe mode workaround