This is what happens when you mix python and JS together... things get messy