Fix for issue 16. Problem was related to using a numeric vector for group.