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

Atom ref alter/3.2.2