Merge pull request #24 from bartek/master

Animation loop fixes