unlock device in case of error