Fix behaviour of takeWhile and dropWhile
Fix type signature