fixing avoid bugs

where did they come from?!
fixing merge crash