fixed issues in earlier commit