Fix bug. Add support for custom options.