Fixed redirect errors
added test -> made type/class work