Nullpointer Bug fix.