Some fixes

Feel free to pull and test them.. ;)