merged phush0's modifies to fix issue #84