ffs

some fixes
Merge pull request #1 from almska/master

ffs