Fixes for JS kernel