fortify fixes and api adjustments
Merge pull request #276 from dshurt/master

fortify fixes and api adjustments