fixed a copy/paste induced segmentation fault