fixed small bug in getFlexibleResidueIndices