small bug fixes in preparation for GSoC

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