fix ready callback