Several fixes in calendar