changed 307 redirect to 304