Make some bug fixes and changes relative to wprevents