improved fix of #196