fixed bug where graphics was not initd correctly