Fixed models with namespaces

Merged by author's request (https://github.com/Anahkiasen/polyglot/pull/34)