CORE-3249: changed the default port number to 31381
CORE-3882: fixed a bug that was preventing template validation from working correctly