Wrong function placement. fixes #120