fixes broken error handling
fault tolerance when 'render' is called prior to loading
fixes broken debug code