Trigger error and ready events