fix null pointer error in edit background.