Fixes logical error.