Ports browser hacks

from branch master