fixing graphics bug