add onReady plugin
fix js errors