minor fixes to callback url and checking metadata to make sure parameter is there