Fixed variable initialization bug with user moving mouse over canvas while page is loading.