fix scripts loading order, closes #54