Fixed NullPointers.