Fixed redirect issue in themes