JS is stupid sometimes