Fixed a npe.