bug fix for PhP5.4 compliance