Fix bash function