Updated code

Still not fixed double messages..