fix getTo() method not returning the correct values