fixed #6

props to @svensonsan