Fixed AccessViolations and Assertion errors
Rendering now works