avoid referencing uninitialized variables upon errors