Minor fixes for php 5.2 support in Service