fixed directory redirect issue