fixed bug in fork/advance