Ksm bugs fix

Some small bugs fix in ksm related vases