proper proxy handling