fixed bugs on bash_functions