fixed some loadfile behavior