Added fixes from other branchs

Thanks, @zanox, @codesprint, @JackPoint and @tenebrousedge.