header and footer fix, flash message fix