fixing template issues