Modified Patch according to comments