fix bug in php 5.3.x