check_paid method fix