Bugfixes: compile error and warnings on Linux, and the texture bug