Kev script
bug fix / Instance Resl impl