fixing stub for locator tests
improving error messages
bug fix