Fixed some issues in SunGrid implementation