Fix some production bugs