Fix an error with removing commands after continue