Fixing spec failures and Travis build issue