Updated PreloadJS to 4.0 and corrected related bugs.