added try block for model relations