Fix bug in graphics stuff