added timeout for ajax calls