fixed potential lock when redirect in is used