fixing compilation issue, missing exception handling