modal bug fix