fixing locking hopefully