fixed bash conditions