fixed compilation for Linux & updated SGScript