fixes access to models
Merge pull request #4 from aldarondo/db

fixes access to models