Add missing namespace delcaration
Add missing ifdef
Merge pull request #437 from linas/master

more minor bugfixes