Fix load from resources and bugs.