fix order of requiring javascripts