scriptcomponent improved to allow forward rendering