fixes #284

partially fixes #284