FIX: Allow script to be run after html is loaded