Fixed case insensitivity on locks to address #96 and #168