bug fixed for used under php5.4