Minor fixes (fixed application crash when calculated Energy of the empty sequence).