Merge pull request #45 from kuu/master

Changes needed for working on the mobile platforms.
Change for easily detecting the failure in image loading.