this fixes #52 , #299