fixing npe