Fix offset problems in calendar api