bugfixing model handling