Fixes bug with where javascript would not be generated to markup