Made the Service more compatible with lower PHP versions