logic fix for non-object error on thank you page