bugfix lock, add hash creation