Fixed 'zcheck' crashing bug and added a few checks
Adjusted code in print_group to "proper" way of using buffers