imported patch bugg.diff