bug fix with options