Cleanup cmd on entrypoint setting

Fixes #5147