fixes #255 by modifying model and contract loader