fix invalid memory reference that failed on fedora20 and mint