minor bug fix about strpos function and minor optimization