fix load_on_demand toggle timing for ajax loading failed
add handler for error on demand loading
Merge pull request #113 from dot/dev

failsafe in load_on_demand