Fixed method return values and remove dbg output

Signed-off-by: parhamfh <parhamfh@kth.se>