added check to wrong sub key in history request