#134 fix index creation for sub types