Correction and optimizations based on Alex comments. Fix for CPDatePickerTest