Fix command line bug when entering front and rear node