Fixed runtime exception due to race condition with pet loading