improved getInstace function
Merge branch 'master' of https://github.com/restimguay/jlib