merge changes from trunk for browser compatibility