Fix bug issues in UserStorage factory