Fixed Anthony's null pointer exception.