fixed problems

Issue #934