Fixed the canonical url and added a test