Fixed stb model saving (issue #2972)