Corrected the resolution using the boxed object's properties when inferring type