ADDED: debug to track ready race condition