fixed NullReferenceException when _styles is not set