fixed controller error and element JS