stats extension mode function always returns a list

When there is only one mode, return a list of length 1.

fixes #338