Fixed bug in app loading that could result in relationship not created errors