fix castGroup