pull request to fix latest issues

sorry, had to fix the last request because it contained some minor errors. here's the final pull request ;)