Fixed exception case hackily