Fixed exception issues