How to stop automatic straight lines between two dots?