Fixed graphics bugs