fixes for tempalte rest and dataavailable