Fixed implementations and errors.