wrapper and other fixes