fixed invalid operation exception