fix adding start and end coordinates