Fix lifetime bug