fixed broken merged code