fixed build errors mentioned in bug #6.