Fixed a NullpointerException.