Fixed bugs in develope branch