Fix next implementation