changed unlock() method to use remove() instead of clearProperty as this doesn't work on some platforms