Library fixes