fix issue with FormHelper and undefined variable and extract