Fixed an issue when returning a boxed object