Convertion problem of pointers of different type