Fix/1339 tern loading

Fix for #1339