an attempt at fixing egret.