corrections in bash functions