Fixing error redirect