Permit bug fix