(int) casting to match serviceId

I couldn't get it to accept or reject services on the profile until I added int casts in three places... not sure why, but I guess one of them is not an int... maybe it's just my PHP version?