Fix bugs during deploy