Quick Fix

Fixed error when spinner is not initialized and document is ready