Fix Direct Algorithm bug and run it from web side