Fixed issues with saving and opening