intermediate fix, does not crash immediately but looks forever
finally working