Fix unlock problems