Imported Upstream version 2.4+gitab9c37f
Fixed patches for new upstream version