Fix module end command