Fixed some bugs caused by conflicts.

Signed-off-by: Dimitar Dobrev <dpldobrev@yahoo.com>