Update Factory.php

Fixed error in version comparison