fixing bug5

Fixes #5