fix exception in gwt mode