fixed bug with texture binding, changed fillStyle calculation