rewrite modal module, fix select module bug.