a better fix of #5