Fix minor bugs

Fix minor bugs when return object