fixed modal bugs