Added redirection & fixed boolean issue