sam: fix return code for sub-commands
fix #208