fixed endless loop in playagin method