Fixed issues with "dangling" curves