Several attempts to fix the search bar wrapping. However fixes are too buggy and segmented. Need a revised and cleaner approach.