fixing debug&rAF in test.js