code fix and gfx fix