fix fee calculation