Fix for leaves animation bug #1

A bug which freezes the leaves animation calculation has been discovered
and a fix was written to it by a guy called Nikolay. I just implemented
it and will now test if the fix solves this issue.