Detect used resource fix. Subroutine rename