fixed assign of invalid pointer type