fixing  query returns empty struct