Fixed Id query issue