fixed some search crashes, tear-off logic, and customer save/edit bugs