fixes for non js platforms