Fix logic