bug fix after revert