fixed view issues with new db models