AT: Better failure handling and removed wrong unlock