Incorporated eug48's pull request