patch by @elHornair to properly instantiate the logic exception