fixed problem with dynamic timeout