fix crash due to copy&paste bug
merge 3.2 branch into master