fixed initialisation and custom type support