Modal bug fix