fixed bash functions