fixed bug in main.js doneEncoding function where concatenation was happening instead of math due to implicit type conversion