fixed message loop