Moved some code around to reduce SCanvas non-crashing Errors