Fixed runtime scoping error on older versions of php