fixed some issues when saving and displaying