Fix percentage calculations