Replaced getheader with getheaders[0]. Fixes #4