adding some fixes to integrate the underlying framework better.