Fix bugs in gmx chi and gmx angle