fixed unlock bugs