segment fault solved in ants moses example

I'm sorry if something is not right, this is my first commit