fixed bug in canonical redirect