Updated to make sure IPN is valid