ctrtool: updated ncsd code

added more flag detection