modal hide fixed

call to modal.loading doesn't create modal and call to modal.hide fails
Merge pull request #16 from iolalde/patch-1

modal hide fixed