fixed bug in calendar return value