move .ready override outside the plugin