fixed null pointer value bug