Enhance layout,  bugfix for production-mode