Use key to remove static field from mongodb

Fixes #613.