found refence to self and switch it to elem in r-marked.js