fixed unlock bug