Fix object id cast error