Fixed a small bug for php 5.4 and higher