Fixed a couple of small bugs in Graphics engine.