restore libical and correct mask