Fixed merged code errors