Fixed bug in cut()'s opimization.