HOTFIX: Incorrect error code checked