fixes for library compatibility