Fix #3: Move messages out of the main block.