Fixed issue in Hash function