Fix bash variable not found issue