Fixed some warnings in ObjectService (may reduce crashes)