fix issue with scripts loading