I know there's a bug in my logic, I just can't figure it out. Thanks.