fix lock in put
add try/finally