fix for compare assert and exception