Merge pull request #130 from dsandras/ds-pua-dbupdate-fix

Fixes bug where the pua db elements were deleted too early.
Conflicts:
	modules/pua/pua.c

(cherry picked from commit 313f41ad46921d543980fa9fc71fb0715d385085)