Several pointer addressing fixes made