Fix deployment bugs