taking care npe on close