fixed the bug deleting the agreements without amount in the helper