Try to move initialization to after onload