Fix for ajax on loading files