Fixed 2 nullpointers.