fixed modal bugs and css rendering issues