Inlined constructor to avoid linker error