Fixes an error in the popup handler sample script