fixes for auto JSON and modal handling