Fix library errors