Aplied patches from Haikuports
Merge pull request #2 from radustoma/newb

Aplied patches from Haikuports