Merging commits from manutarus' issue#123