Fixed pointer issues in Form