fix library thanks to stanfe