Fix error in implenenting log a base b