bugfix on leftover of takeWhile and takeWhileR. made tests for them