bug fix regarding modal