fixed image load, needed to remove comments placed by editting programs in the header
added error handling to init