fixed dismiss bug