Patch from Battler

Improved version