Fix percentage calculation