fix bug in modal