removed null pointer exception when no algorithm is selected