Properly parse custom options, fixes #110