merged issue#300 fixes