Fixing specs and tests