some bug fixes to the enhanced API