Fixes graphics initialization bug