Fixed null pointer exception on merge