Fix use of msg before assignment