fixed redirect handling, random exceptions