ready event was in a wrong place on bridge.js