Some fixes to perforce formula