bug fix for gui, data is now consistent between view and db