Modified Scriptloader.cpp