fixed redirect bug. was giving 391 status instead of 301