finally fixed the silly javascript errors I'd made