Some fixes wrt. temporary elements.