Fix for saving layout