Fix environment issues with specs