muahahhaha, i win. found the bug, overwriting a variable by accident when doing swapping