Fixes issue where modal flickers when closing when using fade-in/fade-ou...

...t animation, 500 ms delay wasn't enough so changed to 320 ms