fixes #278 and #280