update constructor to be compatible with EE 2.6

to fix errors in EE developer log and php errors