More error handling and fixed temperature/humidity swap