repository fixes and tests