fixed issue on php 5.2