fixing bug in modal demo