Adding max timeout