Fire 'ready' event only once (fixes #510)