Fixing a bug in Modal