Patch 1

This Replaces Pull Request done befor in one patch! pull request #1069