fix duration bug

dismissWithStyle does not react on duration