fix rendering and saving