fixed some more modal bugs