fix compatibility issue regarding php 5.3