Fix nil data problem