merge conman's change. thanks conman