fix an issue by adding an option to the function getMesh. The function was looking recursively to return the actual mesh. But in some case we want the instance.