fixed NPE about data context