Revert "reworked chamaken's patch again"

This reverts commit 945f0ddee1ec2993dda09147984e898648ae0e56.