fix separate by type