Fixed a lock on windows