Actually fixed the null pointer exception.