Use same code for ASIM/legacy
fix compile