proxy query: refactoring, object query: added check for correct md5 length