Minor fixes

- Minor error when checking for non-zero contribution amounts fixed

- Successfully closing sessions after commits to the db