Resolved issue around calling ready handler twice.