fixed alter function by removing wrong optimization
Merge pull request #2495 from gurbuzali/atom-ref-alter/3.3

fixed alter function by removing wrong optimization