fix
modified. not tested.