Fixed the failing texture bug