fixed bug on km2