Add an additional workaround to arkref problem
Improve code of arkref files