fire 'ready' event only once, fixes #510