fixing npe.