fix for jai exception problems