Fixed bug in ball demo