Buggy modal dialogue