Fixing crazy message handling. Now works as expected