Fixed issues for all test specs to pass.