Fix some spec failures and warnings