fix fatal error on block function
piCal version 0.97.1