fixed several uninitialized variables