Fixed mistake recent pull request

I recently made a pull request #7458 and noticed I committed the wrong version of it. Here is the corrected version sorry.