Added some logic to try to trap npe.