Also this logic should be covered by some testcase.