Fixed a bug in graphics