fix error after refactoring

*sigh* fucking types, js. and unit tests, hraban.