Fix build dependency order issue with messages