Minor changes to already working logic for validation with Papi