fix to work with php 5.5