fixed null pointer but