actually support overriding with options
(cherry picked from commit efb393d482f1b534f49db7c042b63e19507460ef)