Fixes #1 - using lockerror instead of err