Fix some issues from previous merge