fixed some issues and incorrect uses of the model