Port changes made in #50 / #51 to develop