Fix relative pathname bug when loading
Some messy hacks to get things done tonight