Replaced deprecated Exceptions to solve #423