Fix some loading issues

Addresses #405 and #403