fixes #2326 small tweak when reading resources