Fix for occasional crashes when merging accounts