Fixed readHeader from Resource.