fixes #284 and fixes #279