Fixes onReady called twice