fix cd and empty line problem in bash environment