fix warning
fix type ambiguity in parameters and remove hack in viewer.(due to that ambiguity).