fixed the bugs introduced from poor rebasing/merging

Signed-off-by: Spyros <morfeas3000@gmail.com>