revert "some improvements" as it caused some weird glitches