Mode to default 0, fix the return bug