fixed graphics bugs