functions.js was loaded twice. wtf.