fixed saving a dashboard function