added rescue block to pushing url from redirect