Fixed a bug in the model controller and container