Fixed resource location bugs