Objectives are now saved properly to the database

fixes #325