fix drawing graph