Fixing error when use of function like (string)idx($ is not replaced