Fix triangle bug