Fixed example to work in Firefox and added more debug info to example.