Add fixes from EB branch to master