fixed calculation of calendar bounds, now it displays better