trying to fix #1 . Will need to test a little more.