better error handling when adding a member