Fix options issues and tests