#136 fixed condition for using the template