Fixes for last pull request