Fix for reading resourcefile