added fix for npe