Fixed empty search and connection refuse issues for search. Improved the styling for flash messages.