fix bug so redirects to correct path, and fix bug for time open