prevent positionModal from rendering error before modal has been initialized