better error handling for ready behaviour