Cleanup cmd on entrypoint setting

Fixes #5147
nitpick, but the appropriate english here is "set", not "setted". No need to modify unless you'd like to.