Fixes related to function move