This paper describes a Simulated Student architecture designed to detect and avoid three situations that decrease the benefits of learning in collaboration. These are off-topic conversations, students with passive behaviour and problems related to students' learning. In order to check the efficiency of the model in a real case a Simulated Student, which has the features described in the model, was added to a collaborative, synchronous system for learning programming. This paper describes the experiment undertaken to test the efficiency of the Simulated Student at correcting the three negative situations. The experiment showed that in the majority of the situations the Simulated Student worked correctly, thus proving that the model proposed is adequate in the avoidance of negative situations. Keywords. Collaborative learning, simulated student, off-topic conversation, passive students