Fixed texture buffer bug