fixed pointer issues.