Fixed segfault in construction of temporaries