Fixed bug that prevented the graphics to refresh properly