Changes for Teragen to work