fix npe after upgrade