Fixed some bugs caused by conflicts.

Signed-off-by: Dimitar Dobrev <dpldobrev@yahoo.com>
Merge pull request #276 from ddobrev/master

Fixed some bugs caused by conflicts