Fixed bugs in developer branch