fix template ports