Fix the same bug for non-integer coordinates