* fixed a notice about passing the return of array_keys as reference in the end function