fix bug with profile
add device template