Remove console.log
Fix two severe bugs if order is not set