Cleanup in rendering