Fixed synchronus loading of scripts