various fixes
Merge pull request #114 from spyl94/fix-prototype

various fixes