html working: NaN and impossible triangle bugs present