fixed the code broken during branch merges