Resolve target issue on actions and with-controller

Closes #4384
Closes #4398