fixed graphical bugs caused by commit f77bbb8f and 1b4dc759