fixed preg_grep behaviour