fixed a bug in support for php 5.3