Fix some errors with overlapping commands