fixed problem with pause & resume