Always send return code after plugins command

Closes #2012