Resolving bug in callback URL generation