added fix fixes #1 fixes #3