Solved communication bug with HTML page and JS