small fix to advance