Update loader.c

Moved from pull request on master to 1.3.0