TypeError fixed for popup().