Improved the rehash bash.