fixes #17 and #18 to remove dead code , thanks Insights