fixes #740

fix for some issues