Fixing npe.