fix bug for php 5.7