update graphics.c by Blefish (Thanks to Blefish)
update for recovery