strange js workaround