Fixes for loading scripts