agent loading works, but crashes