maybe fixed a part of #566
maybe fixed a part of #566