fixed intel compatibility, added some error handling in case mathlink crashes