fixed NullReferenceException and tests