fixed bug for php 5.4