compatibility fix 

The version of this fix I submitted yesterday inadvertently broke compatibility with php 5.3. This will fix that.