Bugs fixed and merged branches