solved ajax bug @ adding detail type + some other changes