Fixed the cutoff checking and added a test case which triggered it.