Fixed wrong reference percentage calculation