better handling of redirect after actions