applying the fix from friendica issue 1179

see frienica issue 1179