compilation & exception fixed