fix issues in last patch