Move click event listener after page loads.

Fix for #50