Merged ebuildy's patch.