ported latest changed from casco