fixed preg_replace deprecated error in PHP 5.5