Minor fixes for new php version