Preloader Fix

Added a loading complete event handler to fix a bug where the preloader
would hang if already loaded in some browsers.