Using popup instead of alert as alert prevents callbacks