merge loader dumped by dephined, viewtiful_jay and StripTheSoul.
some fixes for some regression introduced by my latest changes