Properly set model on socket listener