fix to extract correct types from merged structure