Fixed errors with connecting lines