fixes for incorrect/uninitialized variables