Bug fixes in LSH