Fix logic error on commit 3624873