Updated R2 calculation to address possible masked frame issues, but doesn't seem to matter