fixed lifetime bug