fixed bug in cut