Copied CTL_QUERY to prevent undefined reference error