added fix for readlink -f referencing the wrong file