Slight fixes to make limit clause except slightly less code