some bugfixes in new unlock script, should work for the implemented ones