fix expensive move code path