Fixed a bug in the pyramid and physics examples.