Fixed processMessage for debug mode