upload and layout fixes