Logical mistake

Please merge.